from celery import Celery
import time
app = Celery('tasks', broker='redis://127.0.0.1:6379/1', backend='redis://127.0.0.1:6379/2')

@app.task
def hello():
    print('--------------------1----------')
    time.sleep(2)
    return 'hello world'